
/**
 * @author Khurana
 *
 */
public class BicycleDemoWithGetSet
{
	public static void main (String[] args)
	{
		
	BicycleWithGetSet bike1= new BicycleWithGetSet();
	BicycleWithGetSet bike2 = new BicycleWithGetSet();
	
	System.out.println("\nbike1 is added up in the inventory:-- ");	
	bike1.setBicycleId(1);
	bike1.setBicycleBrand("huffy");
	bike1.setBicycleModel("disneyprincess");
    bike1.setBicycleHeight(12);
	bike1.setBicyclePrice(69);
		
	System.out.println("\nbike2 is added up in the inventory:--");
	bike2.setBicycleId(2);
	bike2.setBicycleBrand("shwinn");
	bike2.setBicycleModel("girl's ranger");
    bike2.setBicycleHeight(24);
	bike2.setBicyclePrice(189);

	
	//int heightRequested= 12;
	//String modelRequested="disneyprincess";
	int heightRequested= 24;
	String modelRequested="girl's ranger";
	
	System.out.println("\nshowing bike availability here \n:--");
	if((bike1.getBicycleHeight()==heightRequested) && (bike1.getBicycleModel()==modelRequested))
	{
       System.out.println("bike id: " + bike1.getBicycleId());
       System.out.println("bike brand: " + bike1.getBicycleBrand());
       System.out.println("bike Model: " + bike1.getBicycleModel());
       System.out.println("bike height: " + bike1.getBicycleHeight());
       System.out.println("bike price: " + bike1.getBicyclePrice());
       
	}
	else if((bike2.getBicycleHeight()==heightRequested) && (bike2.getBicycleModel()==modelRequested))
	{
       System.out.println("bike id: " + bike2.getBicycleId());
       System.out.println("bike brand: " + bike2.getBicycleBrand());
       System.out.println("bike Model: " + bike2.getBicycleModel());
       System.out.println("bike height: " + bike2.getBicycleHeight());
       System.out.println("bike price: " + bike2.getBicyclePrice());
       
	}
	else
	{
		System.out.println(modelRequested+" with " + heightRequested+ "  inch height is not available in store");
	}
	
	System.out.println("\nSelling bike here:-\n");
	boolean gotPayment=true;
	
	
	if ((gotPayment==true) && (heightRequested==bike1.getBicycleHeight()) && (modelRequested ==bike1.getBicycleModel()))
	{
		bike1.setBikeSold(true);
		bike1.setBicycleBrand("");
		bike1.setBicycleHeight(0);
		bike1.setBicycleId(0);
		bike1.setBicycleModel("");
		bike1.setBicyclePrice(0);
		System.out.println("Got payment for bike1.");
		
		
	}else if ((gotPayment==true) && (heightRequested==bike2.getBicycleHeight()) && (modelRequested ==bike2.getBicycleModel()))
	
	{
		bike2.setBikeSold(true);
		bike2.setBicycleBrand("");
		bike2.setBicycleHeight(0);
		bike2.setBicycleId(0);
		bike2.setBicycleModel("");
		bike2.setBicyclePrice(0);
		System.out.println("Got payment for bike2.");
	}
		System.out.println(modelRequested+" with " + heightRequested+ "  inch height is sold out.");
	
	
	

}
}